package com.crm.common;

import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import static org.springframework.util.ObjectUtils.isEmpty;

@Component
public class Utils {


    public static Utils utils;
    @PostConstruct
    public void init(){
        utils = this ;
    }

    public static Long getDate(){
        return System.currentTimeMillis();
    }

    public static String getStringDate(){
        LocalDate currentDate = LocalDate.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        return currentDate.format(formatter);
    }

}
